﻿using System;
using System.Configuration;
using System.Data;
using System.IO;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Net;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string j = Request.QueryString["jsoncallback"]; // JSONP prefix
        Response.Write(j + "({k: '");

        HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create("http://localhost:7777/driver.html");
        WebReq.Method = "GET";
        HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse();
        Stream Answer = WebResp.GetResponseStream();
        StreamReader _Answer = new StreamReader(Answer);
        Response.Write(_Answer.ReadToEnd().Replace("'", "\\'").Replace("\r\n", " "));

        Response.Write("' })"); // end of JSONP
    }
}
